modelbutton: Remove snapshot implementation
authorTimm Bäder <mail@baedert.org>
Thu, 19 Jul 2018 17:12:25 +0000 (19:12 +0200)
committerTimm Bäder <mail@baedert.org>
Sun, 5 Aug 2018 08:22:10 +0000 (10:22 +0200)
Previously, GtkBin was only snapshot'ing its one and only child, but
nowadays it doesn't implement snapshot at all and the default
implementation in GtkWidget just snapshots all child widgets, which is
exactly what the implementation in gtkmodelbutton.c was doing.

gtk/gtkmodelbutton.c

index 0b4fbf625d0d0ae8eec846b6817c26fbe4836e53..29ff7bd21e83ae53278a1bf7d5a19b3e1b2f35ca 100644 (file)
@@ -852,29 +852,6 @@ gtk_model_button_size_allocate (GtkWidget           *widget,
     }
 }
 
-static void
-gtk_model_button_snapshot (GtkWidget   *widget,
-                           GtkSnapshot *snapshot)
-{
-  if (GTK_MODEL_BUTTON (widget)->iconic)
-    {
-      GTK_WIDGET_CLASS (gtk_model_button_parent_class)->snapshot (widget, snapshot);
-    }
-  else
-    {
-      GtkWidget *child;
-      GtkModelButton *button = GTK_MODEL_BUTTON (widget);
-
-      if (gtk_widget_get_visible (button->indicator_widget))
-        gtk_widget_snapshot_child (widget, button->indicator_widget, snapshot);
-
-      child = gtk_bin_get_child (GTK_BIN (widget));
-      if (child)
-        gtk_widget_snapshot_child (widget, child, snapshot);
-    }
-
-}
-
 static void
 gtk_model_button_destroy (GtkWidget *widget)
 {
@@ -931,7 +908,6 @@ gtk_model_button_class_init (GtkModelButtonClass *class)
 
   widget_class->measure = gtk_model_button_measure;
   widget_class->size_allocate = gtk_model_button_size_allocate;
-  widget_class->snapshot = gtk_model_button_snapshot;
   widget_class->destroy = gtk_model_button_destroy;
   widget_class->state_flags_changed = gtk_model_button_state_flags_changed;
   widget_class->direction_changed = gtk_model_button_direction_changed;